﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace WinFromMediaPlayerDemo.Model
{
    /// <summary>
    /// 远程文件结构
    /// </summary>
    public class RemoteFileInfo
    {
        /// <summary>
        /// 文件下载地址
        /// </summary>
        public string FileUri { get; set; }
        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// 文件大小
        /// </summary>
        public ulong FileSize { get; set; }
        /// <summary>
        /// 指示文件队列中的第几个
        /// </summary>
        public uint FileIndex { get; set; }

        /// <summary>
        /// 文件分区总大小
        /// </summary>
        public uint TotalPartionCount { get; set; }
        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string FileExtension { get; set; }
        /// <summary>
        /// 文件哈希值
        /// </summary>
        public string FileHash { get; set; }
        ///// <summary>
        ///// 文件保存目录
        ///// </summary>
        //public DirectoryInfo SavedDirecotry { get; set; }
        ///// <summary>
        ///// 文件保存名
        ///// </summary>
        //public string SavedFileName { get; set; }

    }

    /// <summary>
    /// 文件分片结构
    /// </summary>
    public class PartionFileInfo
    {
        /// <summary>
        /// 所属文件
        /// </summary>
        public RemoteFileInfo FileInfo { get; set; }

        /// <summary>
        /// 分区索引
        /// </summary>
        public ulong PartionIndex { get; set; }
        /// <summary>
        /// 分区大小
        /// </summary>
        public ulong PartionSize { get; set; }
        
        /// <summary>
        /// 0：下载成功，-1：进行中；-2：已取消；
        /// </summary>
        public sbyte PartionStatu { get; set; }
    }

}
